#include <iostream>
#include <vector>
using namespace std;
#ifdef DEBUG
inline void msg() { cout<<"I'm testing"<<endl; }
#else
inline void msg() {cout<<"I'm releasing myself"<<endl;}
#endif
int main() {
    msg();
    vector<int>test;//build a vector
    test.push_back(1);//use "push_back"
    test.push_back(2);
    test.push_back(3);
    cout<<"------赋值后vector内容------"<<endl;
    for(int i=0;i<3;i++)
{
   cout<<test.at(i)<<"  ";//use "at"
}
   cout<<endl;
    vector<int> tem(test);//复制构造函数
    cout<<"------复制后vector内容------"<<endl;
    for(int i=0;i<3;i++)
    {
        cout<<test.at(i)<<"  ";//use "at"
    }
    cout<<endl;
    test.pop_back();//use "pop_back"
    cout<<"--使用pop_back后vector内容--"<<endl;
    for(int i=0;i<2;i++)
    {
        cout<<test[i]<<"  ";//use "[]"
    }
    cout<<endl;
    test.clear();
    cout<<"----clear之后vector长度-----"<<endl;
    cout<<test.size()<<endl;

}
